from django.urls import path
from salary.views import *

urlpatterns = [
    # 获取全部工资条 添加工资条
    path("payslips/", SalaryView.as_view({"post": "salary_add", "get": "salary_list"})),

    # 获取单条工资条  删除单条工资条 修改单条工资条
    path("removemail/<int:pk>/", SalaryView.as_view({"delete": "salary_delete", "get": "salary_info", "put": "salary_update"})),

    # 搜索工资条
    path("wagesearch/", SalaryView.as_view({"get": "search"})),

    # 9.2
    # 获取 新增 我发起的流程
    path("initiations/", initiationsView.as_view({"post": "initiations_add", "get": "initiations_list"})),

    # 获取我的发起的流程详情
    path("details/<int:pk>/", initiationsView.as_view({"get": "initiations_info", "delete": "initiations_delete"})),

    # 获取待办事项
    path("todos/", TodosView.as_view({"get": "todos_list"})),

    # 搜索待办事项
    path("todosearch/", TodosView.as_view({"get": "search"})),

    # 待办事项详情
    path("detail/<int:pk>/", TodosView.as_view({"get": "todos_info"})),

    # 待办事项(通过)
    path("through/<int:pk>/", ThroughViews.as_view()),

    # 待办事项(驳回)
    path("disallowed/<int:pk>/", DisallowedViews.as_view()),

    # 获取已办事项
    path("dones/", DonesView.as_view({"get": "dones_list"})),

    # 获取已办事项详情
    path("donedetail/<int:pk>/", DonesView.as_view({"get": "dones_info"})),

    # 搜索已办事项
    path("donesearch/", DonesView.as_view({"get": "search"})),

    # 邮件
    path("sendermail/", EmailView.as_view({"post": "send_mail"})),

    # 收件箱
    path("receivermails/", EmailView.as_view({"get": "receive_mail"})),
]




